/*  strindex(s,t) which returns the position of the rightmost occurrence of t in s, or -1 if there is none. */

#include <stdio.h>
int strindex(char s,char t[]);
int pipeme(void);

int main()
{
  printf("%d \n",strindex('x',"sflskdjfsleiidljflsiejfilesjfleijslfije"));
  pipeme();
  return 0;
}

int strindex(char s,char t[])
{
  if (t==0) return -1;
  int i =0;
  int rightmost=-1;
  while (t[i] != 0)
    {
	 if (t[i]==s) rightmost=i;
	 i++;
    }
  return rightmost;
}

int pipeme(void)
{ return 0; }
